<?php
	if (authorized('menus', 'delete', true) && authorized('menu_links', 'delete', true)) {
		if (db_query("DELETE FROM menus WHERE id = {$_POST['menus_id']}")) {
			db_query("DELETE FROM menu_links WHERE menus_id = {$_POST['menus_id']}");
			
			location('/menus/admin/index');
		}
	} else warning('You do not have permission to delete menus.');